Recent advances in computer performance have enabled graphic systems to provide more realistic graphical images using personal computers and home video game computers. In such graphic systems, a number of procedures are implemented to render, or draw, graphic primitives to the display of the system. A “graphic primitive” is a basic component of a graphic picture, such as a polygon. All graphic pictures are formed with combinations of these graphic primitives. Many procedures may be utilized to perform such graphics rendering.
Rendering realistic shadows greatly increases the realism of an overall 3 D scene. In real-time 3 D rendering applications, the realistic rendering of shadows cast by 3 D objects (e.g., characters, trees, buildings, etc.) increases the sense of immersion one obtains during interaction with the scene. Nearly all modern 3 D graphics pipelines include some amount of dedicated hardware/software for implementing some degree of shadow rendering. Shadow rendering, as with texture mapping, is an important improvement to rendering techniques that attempt to increase the realism of 3 D shaded objects.
The problem with shadow rendering is that it greatly complicates the calculations the 3 D pipeline must perform. For real-time 3 D rendering applications, the location of light sources, the different types of light sources, and their effect on the shading calculations of the 3 D objects in the scene must be computed in real-time (e.g., 30 frames per second or more).
For example, in comparison to shading calculations, the geometric relationship between the light source, the surface, and the viewer are processed to determine the correct shade for a given polygon for a pixel. The shading calculations can be done separately for each pixel on each polygon. Therefore, shading calculation time is proportional to the total number of pixels all the polygons project onto from the camera's point of view. However with shadow calculations, the geometric relationship between the surface being rendered and the light source and all intervening objects must be evaluated. Thus, if the number of polygons in a given scene increases, the amount of processing work that has to be performed for each pixel increases as well. Thus, as users increasingly demand realism and immersion from 3 D applications, the scene complexity increases, thereby imposing much greater processing burdens on graphics computer systems. This is especially so with real-time 3 D rendering applications.
Because of this large processing burden, a number of prior art “shortcut” shadow rendering algorithms have been developed. Each of these algorithms implement some means to reduce the amount of brute force processing required to generate pseudo-realistic shadows for a 3 D scene. Generally, less expensive algorithms produce simple, less realistic shadows, while more expensive algorithms yield somewhat more realistic shadows.
For example, some simpler prior art shadow rendering algorithms may implement shading but not shadows. In those algorithms which do render shadows, there are often “special controls” for minimizing the complexity of the shadow problem. There may be surface attributes which allow control regarding whether polygons cast or receive shadows. There may also be shadow-casting attributes for light sources, where the attributes serve to speed up the calculation process by eliminating “unnecessary” calculations from the rendering.
Thus, prior art real-time shadow rendering applications (e.g., z-buffer algorithms, and the like) render shadows without penumbras for the sake of maintaining real-time rendering capabilities (e.g. frames per second). Shadows produced by prior art 3 D rendering programs are generally simplified unrealistic shadows. While the simplifications allow shadow rendering to be performed in real time, they also result in distracting image errors, such as, for example, shadows with incorrect penumbras, without penumbras at all, or shadows with aliased borders.
For example, a realistically rendered shadow should have a penumbra surrounding an umbra, where there is a gradual change in intensity through the penumbra between the fully lit region and umbra. Although shadows can vary tremendously as a function of the lighting environment, the relative size of the umbra/penumbra should accurately reflect the function of the size of the light source and its distance from the object. Such effects determine the quality of a rendered shadow, and enable a viewer to infer information concerning the nature of the light source, and enable a more realistic perception of the three-dimensional environment. For example, the shadows that one would see outdoors depend on the time of day and whether the sky is overcast or not. Realistic, real-time, shadow rendering that maintains frame rate performance as scene complexity increases is generally beyond the capability of prior art real time 3 D rendering.